//
//  MeBizQutoeWatchV.m
//  ZITHER
//
//  Created by weixin on 2018/11/22.
//  Copyright © 2018 weixn. All rights reserved.
//

#import "MeBizQutoeWatchV.h"

@implementation MeBizQutoeWatchV

-(void)setModeTyep2:(MyEnquiryListDataEndNewModel *)modeTyep2{
    _modeTyep2 = modeTyep2;
    NSString *strImage = [NSString stringWithFormat:@"%@%@",RootUrlImage,modeTyep2.imageDefault];
    [self.imag sd_setImageWithURL:[NSURL URLWithString:strImage]];
    self.lab1.text = modeTyep2.goodName;
    self.lab2.text = modeTyep2.brandNameNative;
}
-(void)setModeTyep1:(MyEnquiryListDataNewModel *)modeTyep1{
    _modeTyep1 = modeTyep1;
    
    NSString *strImage = [NSString stringWithFormat:@"%@%@",RootUrlImage,modeTyep1.imageDefault];
    [self.imag sd_setImageWithURL:[NSURL URLWithString:strImage]];
    self.lab1.text = modeTyep1.goodName;
    self.lab2.text = modeTyep1.brandNameNative;
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self addSubview:self.lab1];
        [self addSubview:self.lab2];
        [self addSubview:self.imag];
        [self addSubview:self.cover];

        
        
        [self.lab1 mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self).offset(20);
            make.centerY.equalTo(self.mas_centerY).offset(-20);
        }];
        
        [self.lab2 mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self).offset(20);
            make.centerY.equalTo(self.mas_centerY).offset(10);
            make.height.mas_equalTo(26);

        }];
        
        [self.imag mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(self.mas_right).offset(-15);
            make.centerY.equalTo(self.mas_centerY).offset(0);
            make.height.mas_equalTo(80);
            make.width.mas_equalTo(80);
        }];
        
        [self.cover mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(self.imag.mas_left).offset(0);
            make.centerY.equalTo(self.mas_centerY).offset(0);
            make.height.mas_equalTo(80);
            make.width.mas_equalTo(25);
        }];
        
        
    }
    return self;
}


-(BaseLab *)lab1{
    if (!_lab1) {
        _lab1 = [[BaseLab alloc]initializeFrame:CGRectMake(0, 0, kScreenW, kScreenH) text:@"系列" font:18 textColor:[UIColor blackColor] isBold:NO numberOfLines:0];
        _lab1.font = [UIFont fontWithName:@"PingFangSC-Medium" size:12];

    }
    return _lab1;
}


-(BaseLab *)lab2{
    if (!_lab2) {
        _lab2 = [[BaseLab alloc]initializeFrame:CGRectMake(0, 0, kScreenW, kScreenH) text:@"wwdibnqwinnqoienioqweionqionqwneo" font:18 textColor:[UIColor blackColor] isBold:NO numberOfLines:0];
        _lab2.font = [UIFont fontWithName:@"Arial-BoldMT" size:20];

//        _lab2.font = [UIFont fontWithName:@"CSD-Block-Bold" size:26];

    }
    return _lab2;
}


-(BaseImageV *)imag{
    if (!_imag) {
        _imag = [[BaseImageV alloc]initializeFrame:CGRectMake(0, 0, kScreenW, kScreenH) contentMode:1];
        _imag.image = [UIImage imageNamed:@"sku_更多货源报价"];
    }
    return _imag;
}

-(BaseImageV *)cover{
    if (!_cover) {
        _cover = [[BaseImageV alloc]initializeFrame:CGRectMake(0, 0, kScreenW, kScreenH) contentMode:2];
        _cover.image = [UIImage imageNamed:@"半透明遮罩"];
    }
    return _cover;
}



@end
